{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="mb-20" method="get" action="{:\\think\\Url::build($Request.action)}">
        <div class="select-box" style="width:250px">
            <select name="pid" class="select">
                <option value="0">顶级分类</option>
                {:widget('Ui/selectDb', ['category',  ['id'=>['neq', $vo.id??'0']], ['flat'=>true,'pad_name'=>'name']], $vo.id ?? '')}
            </select>
        </div>
        <input type="text" class="input-text" style="width:250px" placeholder="名称" name="name" value="{$Request.param.name}" >
        <button type="submit" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    </form>
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            {tp:menu menu="add,forbid,resume,delete,saveorder" /}
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count ?? '0'}</strong> 条
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <th width="25"><input type="checkbox"></th>
            <th width="">ID</th>
            <th width="">名称</th>
            <!--<th width="">是否顶部导航</th>-->
            <!--<th width="">是否显示在手机端首页</th>-->
            <th width="">排序</th>
            <th width="">状态</th>
            <th width="70">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr class="text-c">
            <td><input type="checkbox" name="id[]" value="{$vo.id}"></td>
            <td>{$vo.id}</td>
            <td style="text-align: left">{$vo.name|high_light=$Request.param.name}</td>
            <!--<td>{//$vo.is_nav?'是':'否'}</td>-->
            <!--<td>{//$vo.is_wap_index?'显示':'不显示'}</td>-->
            <td style="padding: 0">
    <input type="number" name="sort[{$vo.id}]" value="{$vo.sort}" style="width: 60px;"
        class="input-text text-c order-input" data-id="{$vo.id}"></td>
            <td>{$vo.status|get_status}</td>
            <td class="f-14">
                {$vo.status|show_status=$vo.id}
                {tp:menu menu='sedit' /}
                {tp:menu menu='sdeleteforever' /}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page ?? ''}</div>
</div>
{/block}
{block name="script"}
<script>
    $(function () {
        $("[name='pid']").find("[value='{$Request.param.pid}']").attr("selected", true);
    })
</script>
{/block}

